package com.yhb.channel.provider.event.eventImpls.BJCJ;

import com.yhb.channel.impl.BJCJ.BJCJRemitResultPollingPayload;
import com.yhb.channel.provider.event.EventType;
import com.yhb.channel.provider.event.PayChannelEventBase;
import com.yhb.channel.utils.ChannelJSONUtil;
import lombok.*;

@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
public class PollingRemitResultEvent extends PayChannelEventBase {
    public PollingRemitResultEvent(String payLoad) {
        super();
        this.setPayload(payLoad);
        this.setType(EventType.POLLING_ORDER_STATUS_EVENT);
    }

    public PollingRemitResultEvent(BJCJRemitResultPollingPayload payLoad) {
        super();
        this.setPayload(ChannelJSONUtil.toJson(payLoad));
        this.setType(EventType.POLLING_ORDER_STATUS_EVENT);
    }
}
